<template>
  <div class="container">
    <topTitle :titleText="titleText"></topTitle>
    <div class="mainCon noTitleExplain">
      <el-form
        :model="formData"
        label-width="100px"
        :rules="formRules"
        ref="formData"
        class="form"
      >
        <el-row class="row-padding-bottom">
          <el-col :span="24" class="col-position">
            <el-form-item label="bankCode :">
              <el-input
                v-model.trim="formData.bankCode"
                placeholder="请输入"
                class="proInputWidth"
                clearable
                filterable
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24" class="col-position">
            <el-form-item label="method:">
              <el-input
                v-model.trim="formData.method"
                placeholder="请输入"
                class="proInputWidth"
                clearable
                filterable
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24" class="col-position">
            <el-form-item label="data:">
              <el-input
                v-model.trim="formData.data"
                placeholder="请输入"
                class="proInputWidth"
                clearable
                filterable
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="text-align: center; margin-top: 5px">
          <el-col :span="20">
            <el-form-item>
              <el-button
                class="commonBut saveBtn"
                type="primary"
                @click="searchResult"
                >查 询</el-button
              >
              <!-- <el-button  class="commonBut">取 消</el-button> -->
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div class="resultSty" v-if="isShowResult">
        {{ result }}
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'bankingTest',
  data() {
    return {
      titleText: '银行业务测试',
      formData: {
        bankCode: '',
        method: '',
        data: '',
      },
      isShowResult: false,
      result: '',
    }
  },
  computed: {},
  created() {},
  mounted() {},
  methods: {
    searchResult() {
      this.axios({
        method: 'post',
        url: '/api-su/bankdata/bankquery',
        data: this.formData,
      })
        .then((res) => {
          this.isShowResult = true
          var result = JSON.parse(res.data.result)
          this.result = JSON.stringify(result, null, '\t')
        })
        .catch((error) => {
          this.$message({
            showClose: true,
            duration: 3000,
            message: '查询数据失败',
            type: 'error',
          })
        })
    },
  },
}
</script>
<style scoped lang="less">
.resultSty {
  background: #f5f7fb;
  font-size: 14px;
  padding: 24px;
  border-radius: 5px;
}
// .mainCon  /deep/ .ueditorBox{
//     line-height: 20px;
// }

// .notice{
//     color: #666;
//     // margin-top: 40px;
//     // line-height: 25px;
// }

// .content /deep/ #containerHelp /deep/ .edui-default .edui-editor-breadcrumb{
//     display: none;
// }
// .upLoadDom:hover{
//     cursor: pointer;
// }
.mainCon {
  top: 198px;
}
.proInputWidth {
  width: 500px;
}
</style>
